package com.panda.multiple.tenant3.controller;

import com.panda.multiple.tenant3.domain.po.User;
import com.panda.multiple.tenant3.domain.vo.UserVO;
import com.panda.multiple.tenant3.service.UserService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;


@RestController
@RequestMapping(value = "user")
public class UserController {

    @Resource
    private UserService userService;

    @GetMapping(value = "getValidUsers")
    public List<User> getValidUsers() {
        return userService.getValidUsers();
    }

    @PostMapping(value = "updateById")
    public void updateById(@RequestBody UserVO userVO) {
        userService.updateById(userVO);
    }
}
